package so.ifl.commons.tools;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

/**
 * 
 * create by simon
 * create at 2012-1-13 下午3:39:18
 * <mailto:liangyuanliu@gmail.com>
 */
public class PropertieUtil {
    public static String getProperties(String str) throws IOException {

    	InputStream in = null;
    	try {
    		PropertieUtil data = new PropertieUtil();
    	    in = data.getClass().getResourceAsStream("/conf.properties");
    	    
    	    Properties p = new Properties();
    	    p.load(in);
    	    str = p.getProperty(str);
    	} catch (IOException e) {
    	    throw e;
    	} finally {
    	    if (in != null) {
    		try {
    		    in.close();
    		} catch (IOException e) {
    		    throw e;
    		}
    	    }
    	}
    	return str;
        }
}
